import { Component, OnInit } from '@angular/core';
import { BladeService } from "../../../../shared/blade.service";
import {BladeData} from '../../../../shared/blade/blade-data';
import { Observable } from "rxjs/Observable";
import { MenuAccessListComponent } from "../menu-access/menu-access-list/menu-access-list.component";

@Component({
  selector: 'app-menu-access',
  templateUrl: './menu-access.component.html',
  styleUrls: ['./menu-access.component.css']
})
export class MenuAccessComponent implements OnInit {

  constructor(public bladeService: BladeService) { }

    ngOnInit() {
      this.createMenuAccessListBlade()
    }

    createMenuAccessListBlade() {
      let data: BladeData = new BladeData();
      data.id = "MenuAccessList";
      data.title = "菜单权限";
      data.subtitle = "菜单权限列表";
      data.isClosingDisabled = true;
      let menuAccessListBlade = this.bladeService.createBlade(MenuAccessListComponent, data);
      this.bladeService.showBlade(menuAccessListBlade);
    }

    /**
     * 是否可以离开
     *
     * @returns {(boolean | Observable<boolean> | Promise<boolean>)}
     * @memberof RoleComponent
     */
    canDeactivate(): boolean | Observable<boolean> | Promise<boolean> {
      return true;
    }
}



// WEBPACK FOOTER //
// ./src/app/module/admin/role/menu-access/menu-access.component.ts
